<template>
    <input type="text" v-model="username" />{{ username }}
</template>

<script setup>
    import {ref,onBeforeMount,onMounted,onBeforeUpdate,onUpdated,onBeforeUnmount,onUnmounted,onRenderTracked,onRenderTriggered} from 'vue'

    let username = ref('hello world')
    console.log('代替')

    onBeforeMount(() => {console.log('触发前')})
    onMounted(() => {console.log('触发后')})

    onBeforeUpdate(() => {console.log('更新前')})
    onUpdated(() => console.log('更新后'))
    
    
       
</script>